export class systemManageApi {
  /** 获取用户表格数据 */
  static getRolePageList() {
    return new Promise(resolve => {
      resolve({
        data: {
          records: [
            {
              sequence: 1,
              roleId: 1,
              nameZh: '数据审核人员地面',
              nameEn: 'sjshrydm',
              createTime: '2025-06-27 10:13:29',
              updateTime: '2025-08-07 10:51:22',
              status: 0
            },
            {
              sequence: 2,
              roleId: 8,
              nameZh: '测试角色1234',
              nameEn: 'test1234',
              createTime: '2025-06-26 14:13:54',
              updateTime: '2025-07-16 15:31:10',
              status: 0
            },
            {
              sequence: 3,
              roleId: 2,
              nameZh: '普通用户（下载）',
              nameEn: 'user_download',
              createTime: '2025-06-25 05:45:56',
              updateTime: '2025-08-15 15:45:51',
              status: 0
            }
          ],
          total: 3,
          size: 10,
          current: 1,
          orders: [],
          optimizeCountSql: true,
          hitCount: false,
          searchCount: true,
          pages: 1
        },
        message: '成功',
        code: 200
      })
    })
  }
  /** 删除用户 */
  static delRole() {
    return new Promise(resolve => {
      resolve({
        data: true,
        message: '成功',
        code: 200
      })
    })
  }
  /** 新增用户 */
  static addRole(params) {
    console.log(params, ' params')
    return new Promise(resolve => {
      resolve({
        data: true,
        message: '成功',
        code: 200
      })
    })
  }
  /** 编辑用户 */
  static editRole(params) {
    console.log(params, ' params')
    return new Promise(resolve => {
      resolve({
        data: true,
        message: '成功',
        code: 200
      })
    })
  }
  /** 获取功能列表 */
  static getFunctionList(params: any) {
    console.log(params)
    return new Promise(resolve => {
      resolve({
        data: [
          14, 9, 10, 11, 13, 12, 33, 36, 34, 37, 35, 38, 56, 57, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 25, 39, 40,
          41, 42, 45, 44, 43, 46, 50, 49, 48, 47, 60, 59, 58, 61, 62, 2, 4, 27, 28, 29, 30, 31, 32, 1, 5, 6, 7, 8, 3,
          51, 52, 53, 54, 55
        ],
        message: '成功',
        code: 200
      })
    }) as any
  }
  /** 获取角色列表 */
  static getRoleList() {
    return new Promise(resolve => {
      resolve({
        data: true,
        message: '成功',
        code: 200
      })
    })
  }
  /** 获取菜单功能树结构 */
  static getFunctionTree() {
    return new Promise(resolve => {
      resolve({
        data: [
          {
            level: 1,
            parentId: '0',
            sequence: 2,
            children: [
              {
                level: 2,
                parentId: '2',
                sequence: 1,
                children: [
                  {
                    level: 3,
                    parentId: '4',
                    sequence: 1,
                    name: '统计图',
                    id: '9'
                  },
                  {
                    level: 3,
                    parentId: '4',
                    sequence: 2,
                    name: '统计表',
                    id: '10'
                  },
                  {
                    level: 3,
                    parentId: '4',
                    sequence: 3,
                    name: '统计表下载',
                    id: '11'
                  }
                ],
                name: '首页',
                id: '4'
              },
              {
                level: 2,
                parentId: '2',
                sequence: 2,
                children: [
                  {
                    level: 3,
                    parentId: '27',
                    sequence: 1,
                    name: '图层目录',
                    id: '33'
                  },
                  {
                    level: 3,
                    parentId: '27',
                    sequence: 2,
                    name: '图层详情',
                    id: '34'
                  },
                  {
                    level: 3,
                    parentId: '27',
                    sequence: 3,
                    name: '图层数据下载',
                    id: '35'
                  }
                ],
                name: '数据预览 ',
                id: '27'
              },
              {
                level: 2,
                parentId: '2',
                sequence: 3,
                children: [
                  {
                    level: 3,
                    parentId: '28',
                    sequence: 1,
                    name: '添加数据源',
                    id: '36'
                  },
                  {
                    level: 3,
                    parentId: '28',
                    sequence: 2,
                    name: '修改数据源',
                    id: '37'
                  },
                  {
                    level: 3,
                    parentId: '28',
                    sequence: 3,
                    name: '删除数据源',
                    id: '38'
                  }
                ],
                name: '数据源管理',
                id: '28'
              },
              {
                level: 2,
                parentId: '2',
                sequence: 4,
                children: [
                  {
                    level: 3,
                    parentId: '29',
                    sequence: 1,
                    name: '元数据新增',
                    id: '39'
                  },
                  {
                    level: 3,
                    parentId: '29',
                    sequence: 2,
                    name: '元数据编辑',
                    id: '40'
                  },
                  {
                    level: 3,
                    parentId: '29',
                    sequence: 3,
                    name: '图层目录树编辑',
                    id: '41'
                  },
                  {
                    level: 3,
                    parentId: '29',
                    sequence: 4,
                    name: '数据目录配置',
                    id: '42'
                  }
                ],
                name: '数据管理',
                id: '29'
              },
              {
                level: 2,
                parentId: '2',
                sequence: 5,
                children: [
                  {
                    level: 3,
                    parentId: '30',
                    sequence: 1,
                    name: '符号新增',
                    id: '43'
                  },
                  {
                    level: 3,
                    parentId: '30',
                    sequence: 2,
                    name: '符号替换',
                    id: '44'
                  },
                  {
                    level: 3,
                    parentId: '30',
                    sequence: 3,
                    name: '符号删除',
                    id: '45'
                  }
                ],
                name: '符号管理',
                id: '30'
              },
              {
                level: 2,
                parentId: '2',
                sequence: 6,
                children: [
                  {
                    level: 3,
                    parentId: '31',
                    sequence: 1,
                    name: '服务管理',
                    id: '46'
                  }
                ],
                name: '服务管理',
                id: '31'
              },
              {
                level: 2,
                parentId: '2',
                sequence: 7,
                children: [
                  {
                    level: 3,
                    parentId: '32',
                    sequence: 1,
                    name: '更新总览',
                    id: '47'
                  },
                  {
                    level: 3,
                    parentId: '32',
                    sequence: 2,
                    name: '数据填报',
                    id: '48'
                  },
                  {
                    level: 3,
                    parentId: '32',
                    sequence: 3,
                    name: '数据审核',
                    id: '49'
                  },
                  {
                    level: 3,
                    parentId: '32',
                    sequence: 4,
                    name: '脱密管理',
                    id: '50'
                  }
                ],
                name: '数据更新',
                id: '32'
              },
              {
                level: 1,
                parentId: '2',
                sequence: 8,
                children: [
                  {
                    level: 2,
                    parentId: '1',
                    sequence: 2,
                    children: [
                      {
                        level: 3,
                        parentId: '5',
                        sequence: 1,
                        name: '图层目录',
                        id: '12'
                      },
                      {
                        level: 3,
                        parentId: '5',
                        sequence: 2,
                        name: '图层详情',
                        id: '13'
                      },
                      {
                        level: 3,
                        parentId: '5',
                        sequence: 3,
                        name: '图层数据下载',
                        id: '14'
                      }
                    ],
                    name: '图层',
                    id: '5'
                  },
                  {
                    level: 2,
                    parentId: '1',
                    sequence: 3,
                    children: [
                      {
                        level: 3,
                        parentId: '6',
                        sequence: 1,
                        name: '地图工具',
                        id: '15'
                      }
                    ],
                    name: '工具',
                    id: '6'
                  },
                  {
                    level: 2,
                    parentId: '1',
                    sequence: 4,
                    children: [
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 1,
                        name: '数据查询',
                        id: '16'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 2,
                        name: '定位',
                        id: '17'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 3,
                        name: '地图标记',
                        id: '18'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 4,
                        name: '测距',
                        id: '19'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 5,
                        name: '测面',
                        id: '20'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 6,
                        name: '管线流向',
                        id: '21'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 7,
                        name: '要素标记',
                        id: '22'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 8,
                        name: '路径规划',
                        id: '23'
                      },
                      {
                        level: 3,
                        parentId: '7',
                        sequence: 9,
                        name: '专题图',
                        id: '24'
                      }
                    ],
                    name: '功能',
                    id: '7'
                  },
                  {
                    level: 2,
                    parentId: '1',
                    sequence: 5,
                    children: [
                      {
                        level: 3,
                        parentId: '8',
                        sequence: 1,
                        name: '基础天地图',
                        id: '25'
                      },
                      {
                        level: 3,
                        parentId: '8',
                        sequence: 2,
                        name: '高清影像',
                        id: '26'
                      }
                    ],
                    name: '底图',
                    id: '8'
                  }
                ],
                name: '工程辅助设计',
                id: '1'
              },
              {
                level: 1,
                parentId: '2',
                sequence: 9,
                children: [
                  {
                    level: 2,
                    parentId: '3',
                    sequence: 1,
                    children: [
                      {
                        level: 3,
                        parentId: '51',
                        sequence: 1,
                        name: '用户角色配置',
                        id: '56'
                      }
                    ],
                    name: '用户管理',
                    id: '51'
                  },
                  {
                    level: 2,
                    parentId: '3',
                    sequence: 2,
                    children: [
                      {
                        level: 3,
                        parentId: '52',
                        sequence: 1,
                        name: '组织机构角色配置',
                        id: '57'
                      }
                    ],
                    name: '组织机构',
                    id: '52'
                  },
                  {
                    level: 2,
                    parentId: '3',
                    sequence: 3,
                    children: [
                      {
                        level: 3,
                        parentId: '53',
                        sequence: 1,
                        name: '新增角色',
                        id: '58'
                      },
                      {
                        level: 3,
                        parentId: '53',
                        sequence: 2,
                        name: '角色功能权限配置',
                        id: '59'
                      },
                      {
                        level: 3,
                        parentId: '53',
                        sequence: 3,
                        name: '角色数据权限配置',
                        id: '60'
                      }
                    ],
                    name: '角色管理',
                    id: '53'
                  },
                  {
                    level: 2,
                    parentId: '3',
                    sequence: 4,
                    children: [
                      {
                        level: 3,
                        parentId: '54',
                        sequence: 1,
                        name: '角色功能权限配置',
                        id: '61'
                      }
                    ],
                    name: '功能权限',
                    id: '54'
                  },
                  {
                    level: 2,
                    parentId: '3',
                    sequence: 5,
                    children: [
                      {
                        level: 3,
                        parentId: '55',
                        sequence: 1,
                        name: '组织机构数据权限配置',
                        id: '62'
                      }
                    ],
                    name: '数据权限',
                    id: '55'
                  }
                ],
                name: '系统管理',
                id: '3'
              }
            ],
            name: 'GIS空间',
            id: '2'
          }
        ],
        message: '成功',
        code: 200
      })
    })
  }
}
